﻿using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;

namespace WebApplicationStudy.Controllers
{
    /// <summary>
    /// 测试Controller
    /// </summary>
    [Route("api/[controller]/[action]")]
    [ApiController]
    public class StudyController : ControllerBase
    {
        /// <summary>
        /// Fun1方法
        /// </summary>
        /// <param name="param">输入参数</param>
        /// <returns>OK1</returns>
        [HttpGet]
        public IActionResult Fun1(string param)
        {
            return Ok(param);
        }

        /// <summary>
        /// Fun2
        /// </summary>
        /// <returns>OK2</returns>
        [HttpPost]
        public IActionResult Fun2()
        {
            return Ok("你好WebAPI");
        }
    }
}
